V = zeros(7,2);
V(1,:) = [0 0];
V(2,:) = [ 1 0]; V(3,:) = [ 1/2  sqrt(3)/2]; V(4,:) = [-1/2  sqrt(3)/2];
V(5,:) = [-1 0]; V(6,:) = [-1/2 -sqrt(3)/2]; V(7,:) = [ 1/2 -sqrt(3)/2];

T = zeros(6,3);
T(1,:) = [1 2 3]; T(2,:) = [1 3 4]; T(3,:) = [1 4 5];
T(4,:) = [1 5 6]; T(5,:) = [1 6 7]; T(6,:) = [1 7 2];

[T,E,ET,TE,VE]=build_fem_mesh(V,T);

d = 5;

[dof_map_c0,n_dof_c0] = build_dof_map_c0(T,TE,ET,d);
[dof_map_c1,n_dof_c1] = build_dof_map_c1(T,TE,ET,d);

W = build_c1_weight3(V,T,E,TE,d);

for idx = 1:n_dof_c1
    
    [c,c1] = show_basis_c1(dof_map_c0, dof_map_c1, V, T, W, idx, d, 12); view(10, 25);
   
    pause;
end